﻿using CleanArchitecture.Infrastructure.Entities;
using CleanArchitecture.Infrastructure.ModelBinding;
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace CleanArchitecture.Infrastructure.Models.AdminUsers
{
    /// <summary>
    /// Represents a news item model
    /// </summary>
    public partial class AdminUserModel : BaseEntityModel
    {
        #region Ctor

        public AdminUserModel()
        {
            
        }

        #endregion

        #region Fields
        [DisplayName("登录账号")]
        [NoTrim]
        public string UserLoginName { get; set; }

        [DisplayName("手机号")]
        [NoTrim]
        public string Mobile { get; set; }

        [DisplayName("邮箱")]
        [NoTrim]
        public string Email { get; set; }

        [NoTrim]
        [DisplayName("显示名")]
        public string UserName { get; set; }

        [DisplayName("状态")]
        public EntityEnumConfig.LockState IsActive { get; set; }

        [DisplayName("账号状态")]
        public EntityEnumConfig.DeleteState IsDeleted { get; set; }
        [DisplayName("是否系统管理员")]
        public EntityEnumConfig.YesorNo IsAdmin { get; set; }

        [DisplayName("上次登录时间")]
        public DateTime LastLoginTime { get; set; }
        
        [DisplayName("上次登录IP")]
        public string LastLoginIpAddress { get; set; }
        
        [DisplayName("个人头像")]
        public string FaceImageUrl { get; set; }

        public string RoleNames { get; set; }
        
        [DisplayName("当前账户密码")]
        public string OldPassword { get; set; }

        [DisplayName("新账户密码")]
        public string NewPassword { get; set; }
        
        [DisplayName("账户密码强度")]
        public string PasswordStrongLevel { get; set; }

        public IList<int> SelectedRoleIds { get; set; }
        [DisplayName("关联角色")]
        public IList<SelectListItem> AvailableAdminRoles { get; set; }
        #endregion
    }
}
